Type Ray Extends BaseObject
	global _rays:TList
	
	Method New()
		If Self._rays = Null Then Self._rays = New TList
		Self._rays.AddLast(Self)
	End Method
	
	
	Function Create:Ray(origin:bVector3 = Null, direction:bVector3 = Null)
		If origin = Null Then origin = bVector3.NullVec()
		If direction = Null Then direction = bVector3.NullVec()
		Local r:Ray = New Ray
		r._ptr = o_ray_Create(origin.toC(), direction.toC())
		r._typ = ET_NO_ENTITY
		
		Return r
	End Function
End Type